package com.numberone.master.modules.orders.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.numberone.master.common.persistence.Page;
import com.numberone.master.common.service.CrudService;
import com.numberone.master.modules.orders.entity.ShareOrder;
import com.numberone.master.modules.orders.dao.ShareOrderDao;

/**
 * 分润Service
 * @author ck
 * @version 2018-03-27
 */
@Service
@Transactional(readOnly = true)
public class ShareOrderService extends CrudService<ShareOrderDao, ShareOrder> {
	
	@Autowired
	private ShareOrderDao shareOrderDao;

	public ShareOrder get(String id) {
		return super.get(id);
	}
	
	public List<ShareOrder> findList(ShareOrder shareOrder) {
		return super.findList(shareOrder);
	}
	
	public Page<ShareOrder> findPage(Page<ShareOrder> page, ShareOrder shareOrder) {
		return super.findPage(page, shareOrder);
	}
	
	@Transactional(readOnly = false)
	public void save(ShareOrder shareOrder) {
		super.save(shareOrder);
	}

	@Transactional(readOnly = false)
	public void update(ShareOrder shareOrder) {
		super.update(shareOrder);
	}
	
	@Transactional(readOnly = false)
	public void delete(ShareOrder shareOrder) {
		super.delete(shareOrder);
	}
	
	@Transactional(readOnly = true)
	public Double getPriceByDate(String data,String officeId) {
		return shareOrderDao.getPriceByDate(data,officeId);
	}
	
}